﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.Common.Domain.Common;

namespace RedDragon.Common.Domain.Purchase
{
    /// <summary>
    /// 采购/委外
    /// </summary>
    public class PurchaseOutsources : BaseEntity
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//IsPrimaryKey 主键 IsIdentity 自增
        public int PurchaseId { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(200)")]//设置长度
        public string PurchaseNumber { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(200)")]//设置长度
        public string PurchaseName { get; set; }

        /// <summary>
        /// 订单类型(外键)
        /// </summary>
        public int PurchaseTypeId { get; set; }

        /// <summary>
        /// 所属项目(外键)
        /// </summary>
        public int AffiliatedProjectId { get; set; }

        /// <summary>
        /// 协议编码
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(200)")]//设置长度
        public string ProtocolCoding { get; set; }

        /// <summary>
        /// 协议名称
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(100)")]//设置长度
        public string ProtocolName { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(200)")]//设置长度
        public string PurchaseNote { get; set; }

        /// <summary>
        /// 供应商(外键)
        /// </summary>
        public int SupplierId { get; set; }

        /// <summary>
        /// 币种(外键)
        /// </summary>
        public int CurrencyId { get; set; }

        /// <summary>
        /// 预付款金额
        /// </summary>
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 订单开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 订单结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 签订时间
        /// </summary>
        public DateTime? TheDateOfSigning { get; set; }

        /// <summary>
        /// 状态 1-新建 2-变更 3-确认 4-取消
        /// </summary>
        public int PurchaseStatus { get; set; }

        /// <summary>
        /// 计税类型
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(100)")]//设置长度
        public string TaxType { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public decimal TaxRate { get; set; }

        /// <summary>
        /// 制单人
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(100)")]//设置长度
        public string PreparedBy { get; set; }

        /// <summary>
        /// 制单部门(外键)
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        public int ApprovalStatus { get; set; }
    }

    /// <summary>
    /// 订单金额(不含税)
    /// </summary>
    //public int Amount { get; set; }

    /// <summary>
    /// 开票金额(含税)
    /// </summary>
    //public int InvoiceAmount { get; set; }

}
